js get custom attribute

62

javascript get element by custom attribute -

document.querySelector("div[data-automation='something']")

Select element by custom attribute

Comments

Submit
0 Comments